.TH "Zebulon::GeneticAlgorithms::Gene" 3 "13 Oct 2009" "Version 2" "zebulon" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Zebulon::GeneticAlgorithms::Gene \- 
.PP
Structure for representing a gene within a chromosome used in a genetic algorithm.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <gene.h>\fP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef std::vector< \fBGene\fP * > \fBVector\fP"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "virtual \fBGene\fP * \fBClone\fP () const =0"
.br
.ti -1c
.RI "virtual int \fBWrite\fP (FILE *fp) const "
.br
.RI "\fIWrite gene information to a file. It is up to the developer to choose file format. \fP"
.ti -1c
.RI "virtual int \fBWrite\fP (CxUtils::Packet &packet) const "
.br
.RI "\fIWrite gene information within a packet structure. This is useful for developing applications requiring distribution of processing over a network. \fP"
.ti -1c
.RI "virtual int \fBRead\fP (FILE *fp)"
.br
.RI "\fIRead gene information from a file based on format chosen using the Write method. \fP"
.ti -1c
.RI "virtual int \fBRead\fP (const CxUtils::Packet &packet)"
.br
.RI "\fIRead gene information within a packet structure. \fP"
.ti -1c
.RI "virtual bool \fBMutate\fP (const double mutationRate)=0"
.br
.RI "\fIApply mutation to your gene based on the rate provided. \fP"
.in -1c
.SH "Detailed Description"
.PP 
Structure for representing a gene within a chromosome used in a genetic algorithm. 

Inherit from this class, overloading the virtual methods to add functionality for networked distribution, and automatic saving of your solutions with this library. 
.SH "Member Function Documentation"
.PP 
.SS "virtual \fBGene\fP* Zebulon::GeneticAlgorithms::Gene::Clone () const\fC [pure virtual]\fP"\fBReturns:\fP
.RS 4
A duplicate of your gene data. 
.RE
.PP

.SS "virtual bool Zebulon::GeneticAlgorithms::Gene::Mutate (const double mutationRate)\fC [pure virtual]\fP"
.PP
Apply mutation to your gene based on the rate provided. \fBParameters:\fP
.RS 4
\fImutationRate\fP Mutation rate to use. 
.RE
.PP

.SS "virtual int Zebulon::GeneticAlgorithms::Gene::Read (const CxUtils::Packet & packet)\fC [inline, virtual]\fP"
.PP
Read gene information within a packet structure. \fBParameters:\fP
.RS 4
\fIpacket\fP Packet buffer to de-serialize data from.
.RE
.PP
\fBReturns:\fP
.RS 4
Number of bytes read. 
.RE
.PP

.SS "virtual int Zebulon::GeneticAlgorithms::Gene::Write (CxUtils::Packet & packet) const\fC [inline, virtual]\fP"
.PP
Write gene information within a packet structure. This is useful for developing applications requiring distribution of processing over a network. \fBParameters:\fP
.RS 4
\fIpacket\fP Packet buffer to serialize data to.
.RE
.PP
\fBReturns:\fP
.RS 4
Number of bytes written. 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for zebulon from the source code.
